<template>
  <div class="table-page-search-wrapper">
    <el-form :model="searchForm" ref="searchForm" label-width="100px" class="demo-ruleForm">
      <el-row>
        <el-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <el-form-item label="订单/工单号:">
            <el-input v-model="searchForm.orderId" placeholder="请输入订单/工单号" />
          </el-form-item>
        </el-col>
        <el-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <el-form-item label="联系电话:">
            <el-input v-model="searchForm.phone" placeholder="请输入联系电话" />
          </el-form-item>
        </el-col>

        <!-- <el-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <el-form-item label="派单时间:">
            <el-date-picker
              v-model="serviceTime"
              type="datetimerange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              style="width:100%"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </el-form-item>
        </el-col> -->
        <el-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <el-form-item label="门店名称:">
            <el-input v-model="searchForm.shopName" placeholder="请输入门店名称" />
          </el-form-item>
        </el-col>
        <!-- <el-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <el-form-item label="服务人员:">
            <el-input v-model="searchForm.personName" placeholder="请输入服务人员" />
          </el-form-item>
        </el-col> -->
        <el-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <div style="margin-left:30px;margin-bottom:15px;">
            <el-button type="primary" icon="el-icon-search" @click="searchAction()">查询</el-button>
            <el-button icon="el-icon-refresh" @click="resetSearch()" style="margin-left: 8px;">重置</el-button>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
export default {
  name: "search",
  props: ["keyName"],
  data() {
    return {
      statuslist: [
        {
          label: "支付成功",
          value: "00",
        },
        {
          label: "支付失败",
          value: "01",
        },
        {
          label: "待支付",
          value: "02",
        },
        {
          label: "支付中",
          value: "03",
        },
        {
          label: "作废",
          value: "04",
        },
      ], //订单状态
      laiyuanList: [
        {
          label: "线下",
          value: "02",
        },
        {
          label: "APP",
          value: "01",
        },
        {
          label: "小程序",
          value: "00",
        },
      ], //订单来源
      searchForm: {},
      serviceTime: [],
    };
  },
  methods: {
    searchAction() {
      //执行搜索
      if (this.serviceTime) {
        this.searchForm.startTime = this.serviceTime[0];
        this.searchForm.endTime = this.serviceTime[1];
      }
      this.$emit("search");
    },
    resetSearch() {
      this.searchForm = {};
      this.serviceTime = [];
      this.$emit("resetSearch");
    },
    getSearchForm() {
      //获取高级搜索条件
      return {
        ...this.searchForm,
      };
    },
  },
};
</script>


<style lang="less">
</style>>
